package com.lh.springboot.controller;

import com.lh.process.engine.context.ProcessContext;
import com.lh.process.engine.context.ProcessContextFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: linghao
 * @since: 2022/10/25
 */
@RestController
public class TestProcessEngine {

    @Autowired
    private ProcessContextFactory processContextFactory;

    @RequestMapping("/test1")
    public void test1(){
        ProcessContext context = processContextFactory.getContext("process-async");
        context.set("nextId", "node4");
        context.start();
    }
}
